package com.lyy.polymorphic;


/**
 * @Author:  GZQ
 * @date:  2024/11/17 16:42
 * @description: 多态的引出
 */

public class Poly01 {
    public static void main(String[] args) {

        Master tom = new Master("汤姆");

        Dog dog = new Dog("小七");
        Bone bone = new Bone("大棒骨");
        tom.feed(dog, bone);

        System.out.println("======================");
        Cat cat = new Cat("小花");
        Fish fish = new Fish("小黄鱼");
        tom.feed(cat, fish);
    }
}
